﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Core;
using System.Data;
using System.Data.SqlClient;
using System.Configuration;
using System.Collections;
using System.ComponentModel;

namespace Data.DataGet
{
   public class _ChiTietHDN
    {
        DataProvider ob = new SQLProvider();

        public int Insert_ChiTietHDN(string MaCTHDN, string MaHDN, string MaDT, string DonViTinh, int SoLuong, float DonGia)
        {
            string SPName = "insert_ChiTietHDN";
            SqlParameter[] para = new SqlParameter[6];
            para[0] = new SqlParameter("@MaCTHDN", MaCTHDN);
            para[1] = new SqlParameter("@MaHDN", MaHDN);
            para[2] = new SqlParameter("@MaDT", MaDT);
            para[3] = new SqlParameter("@DonViTinh", DonViTinh);
            para[4] = new SqlParameter("@SoLuong", SoLuong);
            para[5] = new SqlParameter("@DonGia", DonGia);
            if (ob.Execute_Modify(SPName, para) > 0)
                return 1;
            else
                return 0;
        }

    }
}
